let mixin = {
	
	onLoad(options) {
		let routes = getCurrentPages();
		const index = routes.length - 1;
		// if(options.token) {
		// 	this.saveToken(options.token)
		// }
		// console.log("当前",routes[index].$page.fullPath);
	},
	data() {
		
	},
	onShareAppMessage(res) {
		if (res.from === 'button') {
			// 来自页面内转发按钮
			console.log(res.target)
		}
		return {
			title: '考研政治真题模拟题一刷到底',
			path: '/pages/index/index',
			imageUrl: 'https://zztkxcx.dodoedu.com/zztkxcx_images/static/img/bg/share.png'
		}
	},
	methods: {
		toast(str) {
			uni.showToast({
				title:str,
				icon:"none"
			})
		},
		goIndex() {
			// uni.navigateTo({
			// 	url:'/pages/index/index'
			// })
		},
	    showS() {
			this.$refs.showS.show();
		},
		goDetail(id){
			uni.navigateTo({
				url:"/pages/detail/detail?id=" + id
			})
		}
	}
}
export default mixin;
